<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="root">
        <h1>
            {{message}}
        </h1>
        <h2>
            潇潇梧叶送寒声，江上秋风动客情。
        </h2>
        <h3>
            {{oldTitle('哼~哼~哼~  啊啊啊啊啊啊啊啊啊啊啊啊啊~~~啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊')}}
        </h3>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@3.2.31/dist/vue.global.js"></script>
    <!--<script>
        const vm = Vue.createApp({
            data(){
                return{
                    message:'潇潇梧叶送寒声，江上秋风动客情。'
                }
            }
        }).mount('#root')
    </script>-->
    <script>
        const app = Vue.createApp({
            data(){
                return{
                    message:'潇潇梧叶送寒声，江上秋风动客情。'
                } 
            },
            methods:{
                oldTitle(title){
                    let newtitle = '';
                    if(title.length>10){
                        newtitle = title.substring(0,10) + '....' + new Date();
                    }
                    else{
                        newtitle = title;
                    }
                    return newtitle;
                }
            }
        })
        const vm = app.mount('#root')
    </script>
</body>
</html>